﻿using System;
using System.Collections.Generic;

namespace WDFactoryLib
{

    public abstract class FactoryUser
    {
        private IFactory factory;

        /// <summary>
        /// Initializes the factory user, using the default
        /// factory instance, which is a singleton and has type
        /// WDFactoryLib.TestKit.BasicFactory
        /// </summary>
        public FactoryUser()
        {
            factory = TestKit.BasicFactory.Default;
        }

        /// <summary>
        /// Initializes the factory user, using a custom
        /// factory implementation.
        /// </summary>
        /// <param name="_factory">The factory.</param>
        public FactoryUser(IFactory _factory)
        {
            factory = _factory;
        }

        protected IFactory Factory
        {
            get { return factory; }
        }
    }
}
